/**
 * Qilin-web全局通用变量封装
 * @author Qilin
 * @description 全局项目关于请求、文件、环境资源访问的统一配置
 * @createDate 2025-01-20
 * @lastUpdateDate 2025-03-26
 */
import { webConfig } from "../config.js";

// 是否开发模式
const isDev = process.env.NODE_ENV === "development";
// 基础请求路径--开发
const baseUrl = isDev ? location.protocol + "//" + location.host + "/Qilin" : location.protocol + "//" + location.host + "/qilin";
// 基础请求路径--mock模拟
const baseMockUrl = isDev ? location.protocol + "//" + location.host + "/Mock" : location.protocol + "//" + location.host + "/qilin";
// 文件预览\下载地址
const fileIp=isDev ? webConfig.proxyUrl : location.protocol+"//"+location.host+"/qilin";
// 文件查看配置项
const fileOptions={
    serverOriginalName:"originalFilename", //原始文件名称
    serverName:"newFileName", //回显文件的名称
    serverUrl:"fileName", //回显文件的url
};

export {
    isDev,
    baseUrl,
    baseMockUrl,
    fileIp,
    fileOptions
}
